{/* LAYOUT模板 */}
<layout name="login_layout"/>
{/* LAYOUT模板 */}
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
<css href="__CSS__/jquery-ui.css"/>
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="__JS__/core/jquery-ui.1.10.4.js"></script>
<script src="__JS__/core/plugins.js"></script>



<div class="space100"></div>
<div style="border-top:1px solid #E0E0E0;width:100%;"></div>

<div id="loading"></div>



<style>
.complete-input-wrap{width:1200px;margin:auto;}
.user-message-wrap{}
.user-message-wrap .user-message{width:80%;margin:auto;border:3px solid #00CBFE;margin-top:40px;}
.user-message .detail{width:70%;float:right;margin:20px 0px 20px 0px;color:#404040;line-height:30px;}
.user-message-wrap .form-wrap{width:80%;margin:auto;}

.form-group .form-control{height:50px;}
.form-signin input[type="text"]{
	margin-bottom: -1px; 
	border-bottom-right-radius: 0; 
	border-bottom-left-radius: 0; 
}
.form-signin input[type="password"]{
	margin-bottom: -1px; 
	border-top-right-radius: 0; 
	border-top-left-radius: 0; 
}
.button-wrap a{color:dodgerblue;text-decoration:underline;}
.button-wrap a:hover{color:red;}
</style>


<div class="complete-input-wrap">
	<div class="user-message-wrap">
		<div class="user-message clearfix">
			<div class="detail">
				<span class="dp"><b style="font-weight:bolder;">{$user_message.name}</b>,欢迎你到来！</span>
				<span class="dp">马上设置手机和密码，您就可以直接用手机登录音伴尔啦~还有50个积分赠送！</span>
				<span class="dp">积分可以当钱花哦~好牛逼闪闪啊！快来填写啊！！！</span>
			</div>			
		</div>
		<div class="form-wrap" >			
			<form class="form-signin" method="post" action="{:U('pass/set_api_register')}"  style="width:40%;margin:auto; margin-top:20px;">
			  <span class="tips" style="display:block;height:40px;line-height:40px;text-indent:15px;color:red;">
			  	 
			  </span>
			  <div class="form-group">
			    <input type="text" name="mobile" class="form-control name" id="mobile" placeholder="请输入手机号码">			  
			    <input type="password" name="password" class="form-control password" id="password" placeholder="6-20位数字或英文字母">
			  </div>			  
			  <div class="button-wrap">
			  	<input type="hidden" name="api_reg_type" value="{$user_message.api_reg_type}" />
				<input type="hidden" name="type" value="{$type}" />
			  	<button type="button" class="btn btn-success" style="width:60%;height:40px;">立即设置</button>
			  	<a style="height:40px;" href="{:U('pass/register_later')}?type={$type}">&nbsp;&nbsp;跳过此不,立刻购物!</a>
			  </div>
			</form>
		</div>
	</div>
</div>


<script type="text/javascript">	
$(document).ready(function(){
	$('.btn-success').click(function(){
		var datas	=	$('.form-signin').QVal();
		if(datas.mobile == '' || typeof datas.mobile == 'undefined'){
			$('.tips').text("用户名格式不正确"); return;
		}
		if(datas.password == '' || typeof datas.password == 'undefined'){
			$('.tips').text("密码不能为空"); return;
		}
		$('.tips').text("");
		$('.form-signin').submit();			
	});	
	
	$('#mobile').on("change",function(){
		var mobile	=	$(this).val();
		if(mobile == '' || typeof mobile == 'undefined'){
			$('.tips').text("用户名格式不正确"); 
		}
		else{
			$('.tips').text("");
		}
	});
	$('#password').on("change",function(){
		var password	=	$(this).val();
		if(password == '' || typeof password == 'undefined'){
			$('.tips').text("密码不能为空"); 
		}
		else{
			$('.tips').text("");
		}
	});	
});
</script>

